package com.zhny.service;

import com.zhny.dao.IWsADataDao;
import com.zhny.entity.DTU_data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author Create By Alex on 2018/4/5
 */

@Service
public class DeZhouServiceImpl implements IJsonService {
    private Map<Integer, String> dtuTable;

    @Autowired
    private IWsADataDao wsADataDao;

    @Override
    public DTU_data selectDataByDeviceFlag(Integer deviceFlag) {
        String dtu = dtuTable.get(deviceFlag);
        return wsADataDao.select(dtu);
    }

    public void setDtuTable(Map<Integer, String> dtuTable) {
        this.dtuTable = dtuTable;
    }

    public Map<Integer, String> getDtuTable() {
        return dtuTable;
    }

    public IWsADataDao getWsADataDao() {
        return wsADataDao;
    }

    public void setWsADataDao(IWsADataDao wsADataDao) {
        this.wsADataDao = wsADataDao;
    }
}


